function socketMain(io, socket) {
  console.log("socket connected ", socket.id);
  // console.log("someone called me? I am socketMain");

  socket.on("clientAuth", (key) => {
    if (key === "aljsnfdajnfow") {
      // this is a valid nodeclient
      socket.join("clients");
    } else if ((key = "jnjlnifngla")) {
      // valid ui client has joined
      socket.join('uI')
    } else {
      // an invalid client has joined, goodbye
      socket.disconnect(true);
    }
  });

  socket.on("perfData", (data) => {
    console.log(data);
  });
}

module.exports = socketMain;
